% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ejam2barplot_sites.R
\name{plot_barplot_sitegroups}
\alias{plot_barplot_sitegroups}
\title{barplot comparing groups of sites on 1 indicator, based on table of grouped site data}
\usage{
plot_barplot_sitegroups(
  results_bytype,
  varname = "Demog.Index",
  names.arg = NULL,
  main = "Sites by Type",
  xlab = "Groups or Types of Sites",
  ylab = NULL,
  sortby = NULL,
  topn = 10,
  ...
)
}
\arguments{
\item{results_bytype}{table like from ejamit_compare_types_of_places()$results_bytype,
a table of site groups,
one row per type (group), column names at least varname (and "ejam_uniq_id" if names.arg not specified)}

\item{varname}{name of a column in results_bytype, bar height}

\item{names.arg}{optional vector of labels on the bars, like the types of sites represented by each group}

\item{main}{optional, for barplot}

\item{xlab}{optional, for barplot}

\item{ylab}{optional, for barplot, plain English version of varname, indicator that is bar height}

\item{sortby}{set to FALSE if you want to have no sorting, or to an increasing vector
that provides the sort order}

\item{topn}{optional, show only the top n groups (site types) -- Does not show all
by default -- only shows top n groups.}

\item{...}{passed to barplot()}
}
\value{
same as \code{\link[=barplot]{barplot()}}
}
\description{
barplot comparing groups of sites on 1 indicator, based on table of grouped site data
}
\examples{
 out <- ejamit_compare_types_of_places(testpoints_10[1:4, ], 
   typeofsite <- c("A", "B", "B", "C"))
   cbind(Rows_or_length = sapply(out, NROW))
  
 ejam2barplot_sitegroups(out, "sitecount_unique", topn=3, sortby = F)
 
}
\seealso{
\code{\link[=ejam2barplot_sitegroups]{ejam2barplot_sitegroups()}}
}
